草庐IT

javax.annotation : @Nullable vs @CheckForNull

全部标签

解决远程调用三方接口:javax.net.ssl.SSLHandshakeException报错

一、前言最近在对接腾讯会议API接口,在鉴权完成后开始调用对方的接口,在此过程中出现调用报错:javax.net.ssl.SSLHandshakeException。二、出现原因当你在进行https请求时,JDK中不存在三方服务的信任证书,导致出现错误javax.net.ssl.SSLHandshakeException:sun.security.validator.ValidatorException:PKIX路径构建失败。三、解决方法1、获取根证书安装证书到你的JRE的Javacacerts中(安装证书到PATHTOYOURJDK/JRE/lib目录/cacerts中)。2、忽略SSL证书

【异常】JDK11提示 import javax.annotation.Resource;报红,无法导入 Resource这个包

一、报错内容在导入SpringBoot项目之后,importjavax.annotation.Resource;报红,无法导入Resource这个包二、报错说明导入新项目,idea的默认jdk版本是内建的11版本,语言编译级别是11。在JDK11版本以后,移除了javax扩展,javax.annotation这个包被移除了,所以无法使用@Resource注解。三、报错解决把项目jdk切换到系统环境的jdk8,语言level调整到8即可,爆红解决了。

Resolved [org.springframework.web.method.annotation.MethodArgumentTypeMismatchException

废话不多说上报错Resolved[org.springframework.web.method.annotation.MethodArgumentTypeMismatchException:Failedtoconvertvalueoftype'java.lang.String'torequiredtype'int'; nestedexceptionisjava.lang.NumberFormatException:Forinputstring:"errorView"][org.springframework.web.method.annotation解决。MethodArgumentTypeM

成功解决SyntaxError: future feature annotations is not defined

成功解决SyntaxError: future feature annotations is not defined目录解决问题解决思路解决方法T1、Anaconda下安装python3.7T2、临时将以下注释掉也可以解决问题SyntaxError: future feature annotations is not defined解决思路语法错误:没有定义future feature注释解决方法实际上是python版本不对,该语法需要在python3.7以上,而当前版本在python3.6所以导致此错误!T1、Anaconda下安装python3.7conda install python=

javax.net.ssl.SSLException: closing inbound before receiving peer‘s close_notify

问题描述用generator逆向生成的时候遇到一个报错jdbc.connectionURL=jdbc:mysql://localhost:3306/ssmnew?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT原因分析:这错误出现原因是要求开启了mysql的ssl验证(MySQL5.7+默认是开启SSL连接),需要我们主动配置ssl证书信息或者明确指出不适用ssl解决方案:1、明确不使用ssl严重加参数 useSSL=false在获取url最后加上&useSSL=false即可

javax.net.ssl.SSLPeerUnverifiedException: Hostname xxx not verified

问题:使用自定义证书的https链接接入项目,运行项目时报错:javax.net.ssl.SSLPeerUnverifiedException:Hostnamexxxnotverified分析:CommonName和“IP地址”,和服务器的ip地址不一致解决:方法1,通过重新制作证书,保证CN,IP地址同服务器IP地址一致方法2,允许所有证书,给builder设置hostnameVerifier如下:okHttpClient=newOkHttpClient.Builder().readTimeout(READ_TIME_OUT,TimeUnit.MILLISECONDS).connectTim

Spring BOOT:javax.servlet.http.HttpServletRequest异常

 Servlet.service()forservlet[dispatcherServlet]incontextwithpath[]threwexception[Requestprocessingfailed:java.lang.IllegalStateException:Noprimaryorsingleuniqueconstructorfoundforinterfacejavax.servlet.http.HttpServletRequest]withrootcause             用SpringBoot做验证码的时候,需要用HttpServletRequest保存一些验证码的

java: 无法访问org.springframework.web.bind.annotation.GetMapping ...具有错误的版本 61.0,应为52.0

java:无法访问org.springframework.web.bind.annotation.GetMapping…具有错误的版本61.0,应为52.0problem启动springboot工程时报错提示版本不对reasonjdk版本1.8与springboot3.0.0版本不匹配降级springboot即可2.6.0solution解决办法:修改springboot版本修改完之后版本:成功启动

Python 安装 pyclipper 报错 SyntaxError: future feature annotations is not defined

背景在从源码安装PaddleDetection时,需要安装依赖pyclipper,有时会遇到编译pyclipper时出现的错误,错误提示为未定义futurefeatureannotations。这个错误消息表明setuptools_scm模块中存在语法错误。CollectingpyclipperUsingcachedhttps://pypi.tuna.tsinghua.edu.cn/packages/dd/03/09e2415b72b470851588dfc7c9b7b4f410a79ed8e2c6c1fb25dfec789b70/pyclipper-1.3.0.post4.tar.gzCom

Macos jdk ssl javax.net.ssl.SSLHandshakeException完美解决

 好不容易入手了MacBookpro2021结果发现,在用支付宝sdk调用时,动不动就卡住报了这么一个错误javax.net.ssl.SSLHandshakeException:Remotehostterminatedthehandshake方法1:网上一大把,测试不能用,谷歌了一下,发现少配置了一个环境变量。System.setProperty("jdk.tls.useExtendedMasterSecret","false");//设置环境变量 方法2:/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/se